package com.zw.a.basic.a06.demo08_exercise;

//父类, 里边定义的是整个继承体系的: 共性内容.
public class Person {
    //属性.
    private String name;
    private int age;
    //构造方法.

    public Person() {
    }
    public Person(String name, int age) {
        this.name = name;
        this.age = age;
    }
    //getXxx(), setXxx()

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public int getAge() {
        return age;
    }

    public void setAge(int age) {
        this.age = age;
    }

    //行为.
    public void eat() {
        System.out.println("人要吃饭!");
    }
}
